home *** CD-ROM | disk | FTP | other *** search
/ ftp.cs.arizona.edu / ftp.cs.arizona.edu.tar / ftp.cs.arizona.edu / icon / newsgrp / group01b.txt / 000069_icon-group-sender_Wed Jun 6 12:28:49 2001.msg < prev    next >
Internet Message Format  |  2002-01-03  |  3KB

  1. Return-Path: <icon-group-sender>
  2. Received: (from root@localhost)
  3.     by baskerville.CS.Arizona.EDU (8.11.1/8.11.1) id f56JROA14730
  4.     for icon-group-addresses; Wed, 6 Jun 2001 12:27:24 -0700 (MST)
  5. Message-Id: <200106061927.f56JROA14730@baskerville.CS.Arizona.EDU>
  6. From: Chris.D.Tenaglia@jci.com
  7. Subject: Re: [Icon-Group] Funny result with strings
  8. To: jsampson@indexes.u-net.com
  9. Cc: icon-group@cs.arizona.edu
  10. Date: Wed, 6 Jun 2001 09:59:20 -0500
  11. X-MIMETrack: Serialize by Router on jwimkrs1.na.jci.com/NA/Johnson_Controls(Release 5.0.6a
  12.  |January 17, 2001) at 06/06/2001 10:15:22 AM
  13. Errors-To: icon-group-errors@cs.arizona.edu
  14. Status: RO
  15. Content-Length: 1789
  16.  
  17.  
  18. Greetings,
  19.  
  20. I've been using this procedure since the 1980's with no
  21. problems. It's my favorite and most used procedure.
  22.  
  23. #
  24. # parse a string into a list with respect to a delimiter
  25. #
  26. procedure parse(line,delims)
  27.   static chars
  28.   chars  := &cset -- delims
  29.   tokens := []
  30.   line ? while tab(upto(chars)) do put(tokens,tab(many(chars)))
  31.   return tokens
  32.   end
  33.  
  34.  
  35.  
  36.  
  37.                                                                                                                   
  38.                     jsampson@indexes                                                                              
  39.                     .u-net.com              To:     icon-group@CS.Arizona.EDU                                     
  40.                                             cc:                                                                   
  41.                     06/05/01 08:57          Subject:     [Icon-Group] Funny result with strings                   
  42.                     AM                                                                                            
  43.                                                                                                                   
  44.                                                                                                                   
  45.  
  46.  
  47.  
  48.  
  49. Hello -
  50.  
  51. I have been trying out split.icn, a procedure contributed by Hamish Lawson
  52. in 1996, which converts a string into a list using a cset of characters as
  53. delimiter.
  54.  
  55. I have found that it will not work if the French colon ('|') is the
  56. delimiter, although with other characters it will work. I cannot see
  57. anything in the code to explain this. Are there characters that have
  58. special
  59. functions if they are within strings? I tried '\|' instead of '|' but this
  60. did not work.
  61.  
  62. Regards
  63.  
  64. _John Sampson_
  65.  
  66.  
  67.  
  68.  
  69.  
  70.